package com.kly.cashmall.popup;

import android.content.Context;

import com.kly.cashmall.R;

import razerdp.basepopup.BasePopupWindow;


/**
 * author :
 * date   : 2019-12-23 15:54
 * desc   :
 */
public class LogoutPopupWindow extends BasePopupWindow {

    private final Callback callback;
    public LogoutPopupWindow(Context context, Callback callback) {
        super(context);
        setContentView(R.layout.popup_logout);
        this.callback = callback;
        showPopWindow();
    }

    private void showPopWindow() {
        initView();
        initEvent();
    }

    private void initEvent() {

    }

    private void initView() {
        findViewById(R.id.btn_cancel).setOnClickListener(v -> {
            dismiss();
        });
        findViewById(R.id.btn_confirm).setOnClickListener(v -> {
            callback.onClickListener();
        });
    }

    public interface Callback {
        void onClickListener();
    }
}

